using System;
using System.ComponentModel.DataAnnotations;

namespace UwinEducation.Application.Dtos.Orders
{
    /// <summary>
    /// 订单详情DTO
    /// </summary>
    public class OrderDetailDto
    {
        /// <summary>
        /// 详情ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public Guid OrderId { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// 学生
        /// </summary>
        public StudentDto Student { get; set; }

        /// <summary>
        /// 关联教师课程
        /// </summary>
        public TeacherScheduleDto TeacherSchedule { get; set; }

        /// <summary>
        /// 关联学生课表详情列表
        /// </summary>

        public List<StudentScheduleDetailsDto> StudentScheduleDetails { get; set; }
    }



    /// <summary>
    /// 创建订单详情DTO
    /// </summary>
    public class CreateOrderDetailDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        [Required (ErrorMessage = "订单ID不能为空")] 
        public Guid OrderId { get; set; }

        /// <summary>
        /// 学生ID
        /// </summary>
        [Required (ErrorMessage = "学生ID不能为空")]
        public Guid StudentId { get; set; }

        /// <summary>
        /// 教师课程ID
        /// </summary>
        [Required (ErrorMessage = "教师课程ID不能为空")]
        public Guid TeacherScheduleId { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal? UnitPrice { get; set; }

        /// <summary>
        /// 是否强校验
        /// </summary>
        [Required(ErrorMessage = "是否强校验不能为空")]
        public bool IsForceCheck { get; set; }

        /// <summary>
        /// 学生课程详情列表
        /// </summary>
        public List<CreateStudentScheduleDetailsDtoBase> StudentScheduleDetailsDtos{get;set;}
    }

    public class UpdateOrderDetailDto
    {
        /// <summary>
        /// 订单ID  
        /// </summary>
        [Required(ErrorMessage = "ID不能为空")]
        public Guid Id { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        [Required(ErrorMessage = "单价不能为空")]
        public decimal UnitPrice { get; set; }

    }
} 